#include <stdio.h>
#include <sys/types.h>
#include <sys/times.h>
int urand(void)
{
    int ret;
    struct timeval tv;
    gettimeofday(&tv, NULL);
    srand(tv.tv_sec + tv.tv_usec);
    ret = rand();
    return ret;
}

int urandft(int f, int t)
{
    int ret;
    ret = urand();
    ret = f + ret%(t-f+1);
    return ret;
}


int main()
{
    int num = urandft(1, 10);
    printf("num=%d.\n", num);

    return 0;
}
